﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLNHDAO;

namespace QLNHBUS
{
    public class PhieuGoiMonBUS
    {
        public static void ThemPhieuGoiMon(PhieuGoiMon data)
        {
            PhieuGoiMonDAO pgm = new PhieuGoiMonDAO();
            pgm.Add(data);
        }
        public static PhieuGoiMon LayPhieuGoiMonTheoBanAn(int idBanAn)
        {
            PhieuGoiMonDAO pgm = new PhieuGoiMonDAO();
            var result = pgm.SearchFor(c => c.MaBanAn == idBanAn && c.ThanhToan == false);
            return result.SingleOrDefault();
        }
    }
}
